package com.xingzhi.edu.config;

import com.baomidou.mybatisplus.core.injector.ISqlInjector;
import com.baomidou.mybatisplus.extension.injector.LogicSqlInjector;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Create with Intellij IDEA.
 * Description：插件管理
 * User:Zero
 * Date:2021/3/22
 * Time:23:05
 */
/**
*@Description:因为TeacherMapper是一个接口需要配置注解
*/
@Configuration
@MapperScan("com.xingzhi.edu.mapper")
public class MyConfig {
   /**
   *@Description:逻辑删除插件
   */
    @Bean
    public ISqlInjector sqlInjector() {
        return new LogicSqlInjector();
    }
    /**
    *@Description:分页插件
    */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
